package org.dromara.job.processors;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import tech.powerjob.worker.core.processor.ProcessResult;
import tech.powerjob.worker.core.processor.TaskContext;
import tech.powerjob.worker.core.processor.sdk.BasicProcessor;
import tech.powerjob.worker.log.OmsLogger;

@Slf4j
@Component
public class Demo implements BasicProcessor {
    @Override
    public ProcessResult process(TaskContext taskContext) throws Exception {
        OmsLogger jobParams = taskContext.getOmsLogger();
        jobParams.info("start process,context is {}.",taskContext);
        System.out.println("jobParams is "+ taskContext.getJobParams());

        return new ProcessResult(true,"定时任务执行成功");
    }
}
